package com.copc.controller;//package com.copc.controller;

import com.copc.common.model.ChangeLockStatusVo;
import com.copc.common.model.VoucherRefundVo;
import com.copc.service.IsvDouyinService;
import io.swagger.annotations.Api;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 1.整单退/部分退款接口
 * 2.查询券状态
 */
@Api("抖音接口")
@RestController
@RequestMapping("/isv")
@Log4j2
public class IsvDouyinController {

    @Autowired
    private IsvDouyinService isvDouyinService;

    /**
     *核销退款
     * */
    @RequestMapping(value = "/voucherRefund")
    @ResponseBody
    public void douYinRefund(@RequestBody VoucherRefundVo voucherRefundVo){

        boolean result = isvDouyinService.douYinRefund(voucherRefundVo);
    }

    /**
     * 券解锁
     * */
    @RequestMapping(value = "/unlockCertificate")
    @ResponseBody
    public void unlockCertificate(@RequestBody ChangeLockStatusVo changeLockStatusVo){

        boolean result = isvDouyinService.unlockCertificate(changeLockStatusVo);
    }

    /**
     * 推送服务结算状态
     * */
    @RequestMapping(value = "/pushServiceDone")
    @ResponseBody
    public void pushServiceDone(@RequestBody ChangeLockStatusVo changeLockStatusVo){

        boolean result = isvDouyinService.pushServiceDone(changeLockStatusVo);
    }



}
